package com.eurasia.assignment.domain;

import java.time.LocalDateTime;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 项目领域对象
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Project {
    private Long id;
    private String name;
    private String type;
    private String courseId;
    private String status;
    private Integer points;
    private String creator;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    
    /**
     * 创建新项目
     */
    public static Project create(String name, String type, String courseId, Integer points, String creator) {
        Project project = new Project();
        project.setName(name);
        project.setType(type);
        project.setCourseId(courseId);
        project.setStatus("已创建");
        project.setPoints(points);
        project.setCreator(creator);
        project.setCreateTime(LocalDateTime.now());
        project.setUpdateTime(LocalDateTime.now());
        return project;
    }
} 